﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TeamCommunitySolution.Domain.DataLayer.PlayerMetrics;

namespace TeamCommunitySolution.Repositories.Metrics
{
    /// <summary>
    /// Metrics repository
    /// </summary>
    public interface MetricsRepository
    {
        /// <summary>
        /// Saves the specified metric group.
        /// </summary>
        /// <param name="metricGroup">The metric group.</param>
        void Save(ref MetricGroup metricGroup);

        /// <summary>
        /// Saves the specified metric definition.
        /// </summary>
        /// <param name="metricDefinition">The metric definition.</param>
        void Save(ref MetricDefinition metricDefinition);

        /// <summary>
        /// Saves the specified metric content.
        /// </summary>
        /// <param name="metricContent">Content of the metric.</param>
        void Save(ref MetricContent metricContent);

        /// <summary>
        /// Gets the metric group by field.
        /// </summary>
        /// <param name="fieldName">Name of the field.</param>
        /// <param name="fieldValue">The field value.</param>
        /// <returns>Metric Group Instance.</returns>
        MetricGroup GetMetricGroupByField(string fieldName, string fieldValue);

        /// <summary>
        /// Gets the metric definition by field.
        /// </summary>
        /// <param name="fieldName">Name of the field.</param>
        /// <param name="fieldValue">The field value.</param>
        /// <returns>Metric Definition Instance.</returns>
        MetricDefinition GetMetricDefinitionByField(string fieldName, string fieldValue);
    }
}
